﻿using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
using YArchitech.Controls;
using YArchitech.LIB;
using YArchitech.LIB.YJKControls;

namespace YArchitech.HVAC
{
	public partial class AirTerminalParameter : System.Windows.Forms.Form
	{
		public AirTerminalParameter(ATParameter atParameter)
		{
			this.InitializeComponent();
			new YJKProcessTools().ShowInTaskbarChange(this);
			this.ATP = atParameter;
		}

		private void btnOK_Click(object sender, EventArgs e)
		{
			try
			{
				this.ATP.TopHeight = Convert.ToDouble(this.tbTopHeight.Text);
				this.ATP.ConnectHeight = Convert.ToDouble(this.tbConnectHeight.Text);
				this.ATP.FixHeight = Convert.ToDouble(this.tbFixHeight.Text);
				this.ATP.BottomHeigh = Convert.ToDouble(this.tbBottomHeight.Text);
				base.DialogResult = DialogResult.OK;
			}
			catch (Exception)
			{
				YJKMessageBox.Show("请填入数字");
				this.tbTopHeight.Focus();
			}
		}

		private void btnCancel_Click(object sender, EventArgs e)
		{
			base.DialogResult = DialogResult.Cancel;
		}

		private ATParameter ATP;
	}
}
